(-1.0, 4.0)
(-1.0, 4.0)
Ingeniería Biomédica
2025-10-21
A continuous-time LTI system is defined by:
\[ y(t) = x(t) * h(t) = \int_{-\infty}^{\infty} h(\tau)\,x(t - \tau)\,d\tau \]
where -\(x(t)\)is the input, -\(h(t)\)is the impulse response, -\(y(t)\)is the output.
Let the input be a sinusoid:
\[ x(t) = A \cos(\omega_0 t + \phi) \]
Using Euler’s identity:
\[ x(t) = \frac{A}{2} \left[e^{j(\omega_0 t + \phi)} + e^{-j(\omega_0 t + \phi)}\right] \]
Because the system is linear, we can treat each exponential term separately:
\[ y(t) = \frac{A}{2}\left[ y_1(t) + y_2(t) \right] \] where \[ y_1(t) = e^{j\phi} \int_{-\infty}^{\infty} h(\tau)\, e^{j\omega_0(t-\tau)}\, d\tau \] \[ y_2(t) = e^{-j\phi} \int_{-\infty}^{\infty} h(\tau)\, e^{-j\omega_0(t-\tau)}\, d\tau \]
We can factor out the term\(e^{j\omega_0 t}\):
\[ y_1(t) = e^{j\phi} e^{j\omega_0 t} \int_{-\infty}^{\infty} h(\tau)\, e^{-j\omega_0 \tau}\, d\tau \]
Let \[ H_1 = \int_{-\infty}^{\infty} h(\tau)\, e^{-j\omega_0 \tau}\, d\tau \]
Then, \[ y_1(t) = e^{j\phi} H_1 e^{j\omega_0 t} \]
Similarly, \[ y_2(t) = e^{-j\phi} H_1^* e^{-j\omega_0 t} \]
The total output is:
\[ y(t) = \frac{A}{2}\left[e^{j\phi} H_1 e^{j\omega_0 t} + e^{-j\phi} H_1^* e^{-j\omega_0 t}\right] \]
If we express\(H_1\)in polar form: \[ H_1 = |H_1| e^{j\theta} \]
Then, \[ y(t) = A |H_1| \cos(\omega_0 t + \phi + \theta) \]
\[ \boxed{y(t) = A |H_1| \cos(\omega_0 t + \phi + \theta)} \]
A discrete-time LTI system is defined by the convolution sum:
\[ y[n] = \sum_{k=-\infty}^{\infty} h[k]\,x[n - k] \]
where - \(x[n]\) is the input sequence, - \(h[k]\) is the impulse response, - \(y[n]\) is the output sequence.
Let the input be a discrete sinusoid:
\[ x[n] = A \cos(\omega_0 n + \phi) \]
Using Euler’s identity:
\[ x[n] = \frac{A}{2}\left[e^{j(\omega_0 n + \phi)} + e^{-j(\omega_0 n + \phi)}\right] \]
Because the system is linear, each exponential term can be treated independently:
\[ y[n] = \frac{A}{2}\left[y_1[n] + y_2[n]\right] \]
where \[ y_1[n] = e^{j\phi} \sum_{k=-\infty}^{\infty} h[k]\, e^{j\omega_0 (n - k)} \] \[ y_2[n] = e^{-j\phi} \sum_{k=-\infty}^{\infty} h[k]\, e^{-j\omega_0 (n - k)} \]
We can factor out \(e^{j\omega_0 n}\):
\[ y_1[n] = e^{j\phi} e^{j\omega_0 n} \sum_{k=-\infty}^{\infty} h[k]\, e^{-j\omega_0 k} \]
Let \[ H_1 = \sum_{k=-\infty}^{\infty} h[k]\, e^{-j\omega_0 k} \]
Then, \[ y_1[n] = e^{j\phi} H_1 e^{j\omega_0 n} \]
Similarly, \[ y_2[n] = e^{-j\phi} H_1^* e^{-j\omega_0 n} \]
The total output becomes:
\[ y[n] = \frac{A}{2}\left[e^{j\phi} H_1 e^{j\omega_0 n} + e^{-j\phi} H_1^* e^{-j\omega_0 n}\right] \]
If we write \(H_1\) in polar form: \[ H_1 = |H_1| e^{j\theta} \]
Then, \[ y[n] = A |H_1| \cos(\omega_0 n + \phi + \theta) \]
\[ \boxed{y[n] = A |H_1| \cos(\omega_0 n + \phi + \theta)} \]
\[y(t) = x(t) * h(t) = \int_{-\infty}^{\infty} x(\tau) h(t - \tau) d\tau\]
\[y[n] = \sum_{k=-\infty}^{\infty} x[k] h[n-k]\]
\[X(f) H(f) = Y(f)\]
(-1.0, 4.0)
(-1.0, 4.0)
\[x(t) = \sum_{n=-\infty}^{\infty} C_n e^{jn\omega_0 t}\]
where\(C_n\)are the Fourier coefficients.
\[C_n = \frac{1}{T} \int_{0}^{T} x(t) e^{-jn\omega_0 t} dt\]
For a periodic signal \(x(t)\) with period \(T\):
\[ x(t) = \sum_{k=-\infty}^{\infty} c_k e^{j k \Omega_0 t}, \]
where:
\[ c_k = \frac{1}{T} \int_{T_0}^{T_0 + T} x(t)e^{-jk\Omega_0 t}\,dt, \quad \Omega_0 = \frac{2\pi}{T}. \]
We define a periodic signal \(x(t)\) with period \(2\pi\):
\[ x(t) = \begin{cases} 0, & -\pi \le t < 0,\\ 1, & 0 \le t < \pi. \end{cases} \]
This corresponds to a 50% duty cycle pulse.
Piecewise((I*(-1 + exp(-I*pi*k))/(2*pi*k), (k > 0) | (k < 0)), (1/2, True))
Expected result:
\[ c_k = \begin{cases} \dfrac{1}{2}, & k=0,\\[4pt] \dfrac{j\left((-1)^k - 1\right)}{2\pi k}, & k \ne 0. \end{cases} \]
import numpy as np
import pandas as pd
def ck_numeric(k):
k = np.asarray(k, dtype=float)
return np.where(
k != 0,
1j*(np.exp(1j*np.pi*k)-1)/(2*np.pi*k),
0.5
)
K = 10
ks = np.arange(-K, K+1)
cks = ck_numeric(ks)
pd.DataFrame({
"k": ks,
"Re{c_k}": np.real(cks),
"Im{c_k}": np.imag(cks),
"|c_k|": np.abs(cks)
}) k Re{c_k} Im{c_k} |c_k|
0 -10 1.949086e-17 -0.000000 1.949086e-17
1 -9 -1.949086e-17 0.035368 3.536777e-02
2 -8 1.949086e-17 -0.000000 1.949086e-17
3 -7 -1.949086e-17 0.045473 4.547284e-02
4 -6 1.949086e-17 -0.000000 1.949086e-17
5 -5 -1.949086e-17 0.063662 6.366198e-02
6 -4 1.949086e-17 -0.000000 1.949086e-17
7 -3 -1.949086e-17 0.106103 1.061033e-01
8 -2 1.949086e-17 -0.000000 1.949086e-17
9 -1 -1.949086e-17 0.318310 3.183099e-01
10 0 5.000000e-01 0.000000 5.000000e-01
11 1 -1.949086e-17 -0.318310 3.183099e-01
12 2 1.949086e-17 0.000000 1.949086e-17
13 3 -1.949086e-17 -0.106103 1.061033e-01
14 4 1.949086e-17 0.000000 1.949086e-17
15 5 -1.949086e-17 -0.063662 6.366198e-02
16 6 1.949086e-17 0.000000 1.949086e-17
17 7 -1.949086e-17 -0.045473 4.547284e-02
18 8 1.949086e-17 0.000000 1.949086e-17
19 9 -1.949086e-17 -0.035368 3.536777e-02
20 10 1.949086e-17 0.000000 1.949086e-17
import numpy as np
import matplotlib.pyplot as plt
def x_numeric(t):
# Original pulse over [-π, π): 0 on [-π,0), 1 on [0,π).
tw = ((t + np.pi) % (2*np.pi)) - np.pi
return np.where((tw >= 0) & (tw < np.pi), 1.0, 0.0)
def partial_sum(t, N):
ks = np.arange(-N, N+1)
cks = ck_numeric(ks)
return np.sum(cks[:, None] * np.exp(1j*np.outer(ks, t)), axis=0)
tgrid = np.linspace(-2*np.pi, 2*np.pi, 4000, endpoint=False)
xg = x_numeric(tgrid)N1 = 5
sN1 = partial_sum(tgrid, N1).real
plt.figure(figsize=(8,3))
plt.plot(tgrid, xg, label='x(t) original')
plt.plot(tgrid, sN1, label=f'N={N1}')
plt.xlim([-2*np.pi, 2*np.pi])(-6.283185307179586, 6.283185307179586)
(-6.283185307179586, 6.283185307179586)
| Concept | Expression |
|---|---|
| Fundamental frequency | \(\Omega_0 = \frac{2\pi}{T}\) |
| Coefficient \(c_k\) | \(\frac{1}{T}\int x(t)e^{-jk\Omega_0 t}dt\) |
| Reconstructed signal | \(S_N(t) = \sum_{k=-N}^{N} c_k e^{jk\Omega_0 t}\) |
| Example \(x(t)\) | Half-wave pulse in \([-\pi, \pi)\) |
(array([-5., 0., 5., 10., 15., 20., 25., 30., 35.]), [Text(-5.0, 0, '−5'), Text(0.0, 0, '0'), Text(5.0, 0, '5'), Text(10.0, 0, '10'), Text(15.0, 0, '15'), Text(20.0, 0, '20'), Text(25.0, 0, '25'), Text(30.0, 0, '30'), Text(35.0, 0, '35')])
(array([4.5, 5. , 5.5, 6. , 6.5, 7. , 7.5, 8. , 8.5]), [Text(0, 4.5, '4.5'), Text(0, 5.0, '5.0'), Text(0, 5.5, '5.5'), Text(0, 6.0, '6.0'), Text(0, 6.5, '6.5'), Text(0, 7.0, '7.0'), Text(0, 7.5, '7.5'), Text(0, 8.0, '8.0'), Text(0, 8.5, '8.5')])
(array([-40., -30., -20., -10., 0., 10., 20., 30., 40.]), [Text(-40.0, 0, '−40'), Text(-30.0, 0, '−30'), Text(-20.0, 0, '−20'), Text(-10.0, 0, '−10'), Text(0.0, 0, '0'), Text(10.0, 0, '10'), Text(20.0, 0, '20'), Text(30.0, 0, '30'), Text(40.0, 0, '40')])
(array([4.5, 5. , 5.5, 6. , 6.5, 7. , 7.5, 8. , 8.5]), [Text(0, 4.5, '4.5'), Text(0, 5.0, '5.0'), Text(0, 5.5, '5.5'), Text(0, 6.0, '6.0'), Text(0, 6.5, '6.5'), Text(0, 7.0, '7.0'), Text(0, 7.5, '7.5'), Text(0, 8.0, '8.0'), Text(0, 8.5, '8.5')])
-\(C_k\)represents discrete frequency content. - The spectrum consists of\(N\)harmonics. - Resolution improves with larger\(N\). - Essential for analyzing periodic discrete signals.
DTFS Coefficients:
C[0] = 2.0000+0.0000j
C[1] = -0.6036-0.6036j
C[2] = 0.0000+0.0000j
C[3] = 0.1036-0.1036j
C[4] = 0.0000+0.0000j
C[5] = 0.1036+0.1036j
C[6] = 0.0000+0.0000j
C[7] = -0.6036+0.6036j